package com.xuanyuanxinyu.utils.time

import java.util.Locale

/**
 * 将时间转换成字符串
 * @param time 时间，单位秒  如99609 显示为27:40:09
 */
fun timeTransString(time:Long){
    val day = time / 86400
    val leftDay = (time % 86400)
    val hour = leftDay / 3600
    val leftHour = leftDay % 3600
    val min = leftHour / 60
    val second = leftHour % 60
    val formattedDate = java.lang.String.format(Locale.getDefault(),"%02d:%02d:%02d",(day * 24 + hour),min,second)
    println(formattedDate)
}
